<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Lead
 *
 * @property int $leads_id
 * @property int $customer_id 线索转化为客户ID
 * @property int $is_transform 1已转化
 * @property string|null $name 线索名称
 * @property string|null $source 线索来源
 * @property string|null $telephone 电话
 * @property string|null $mobile 手机
 * @property string|null $industry 客户行业
 * @property string|null $level 客户级别
 * @property string|null $detail_address 地址
 * @property string|null $remark 备注
 * @property int $create_user_id 创建人ID
 * @property int $owner_user_id 负责人ID
 * @property int|null $next_time 下次联系时间
 * @property string|null $follow 跟进
 * @property int $create_time 创建时间
 * @property int $update_time 更新时间
 * @property string|null $crm_vfnlcv 意向面积
 * @property int|null $project_id 项目id
 * @property string|null $status
 * @property string|null $crm_nsffhp 微信
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereCreateTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereCreateUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereCrmNsffhp($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereCrmVfnlcv($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereCustomerId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereDetailAddress($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereFollow($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereIndustry($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereIsTransform($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereLeadsId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereLevel($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereMobile($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereNextTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereOwnerUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereProjectId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereRemark($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereSource($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereTelephone($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereUpdateTime($value)
 * @mixin \Eloquent
 * @property string|null $clue_id 头条id
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereClueId($value)
 * @property string|null $crm_zcwekw 来源时间
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereCrmZcwekw($value)
 * @property-read \App\User|null $owner
 * @property-read \App\User|null $creater
 * @property-read \App\Project|null $project
 * @property int|null $is_send 是否发送
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Lead whereIsSend($value)
 */
class Lead extends Model
{
    protected $table="5kcrm_crm_leads";
    public $timestamps=null;
    protected $primaryKey='leads_id';
    public function owner(){
        return $this->hasOne(User::class,'id','owner_user_id');
    }
    public function creater(){
        return $this->hasOne(User::class,'id','create_user_id');
    }
    public function project(){
        return $this->hasOne(Project::class,'project_id','project_id');
    }

}
